package net.tailfish.api.base.exception;

import net.tailfish.api.base.enums.SnowEnum;

/**
 * @PackageName net.tailfish.api.base.exception
 * @ClassName SnowException
 * @Author tailFish
 * @Date Created in 16:47 2021/5/28
 * @Description 自定义异常
 */
public class SnowException extends RuntimeException{

    private String code;

    public String getCode() {
        return code;
    }

    public SnowException(String message,String code){
        super(message);
        this.code = code;
    }

    public SnowException(SnowEnum snowEnum){
        super(snowEnum.getMsg());
        this.code = snowEnum.getCode();
    }


}
